<?php defined('SYSPATH') or die();?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>配置首页</title>
    {template 'stourtravel/public/public_min_js'}
    {php echo Common::getCss('style.css,base.css,base_new.css'); }
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js,product_add.js,choose.js,imageup.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
</head>

<body>

<table class="content-tab">
    <tr>
        <td width="119px" class="content-lt-td"  valign="top">
            {template 'stourtravel/public/leftnav'}
            <!--右侧内容区-->
        </td>
        <td valign="top" class="content-rt-td ">
            <div class="cfg-header-bar">
                <a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
            </div>
            <form method="post"  id="frm" name="frm" enctype="multipart/form-data">
                <!--基础信息开始-->
                <div class="product-add-div">
                    <ul class="info-item-block">
                        <li>
                            <span class="item-hd">显示/隐藏：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-5"><input type="radio" {if !$cfg['cfg_ferry_notice_open']}checked{/if} name="cfg_ferry_notice_open" value="0">关闭</label>
                                <label class="radio-label ml-5"><input type="radio" {if $cfg['cfg_ferry_notice_open']==1}checked{/if} name="cfg_ferry_notice_open" value="1">开启</label>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">公告：</span>
                            <div class="item-bd">
                                <textarea name="cfg_ferry_notice" class="textarea radius w400 mt-5">{$cfg['cfg_ferry_notice']}</textarea>
                            </div>
                        </li>
                    </ul>
                </div>
                <!--/基础信息结束-->
                <div class="clear clearfix mt-5">
                    <a class="btn btn-primary radius size-L ml-115" id="btn_save" href="javascript:;">保存</a>
                </div>
            </form>
        </td>
    </tr>
</table>

<script>
    $(document).ready(function(){

        $("#nav").find('span').click(function(){

            Product.changeTab(this,'.product-add-div');//导航切换
        })
        $("#nav").find('span').first().trigger('click');



        $("#btn_save").click(function(){
            $.ajaxform({
                url:SITEURL+'ferry/admin/config/ajax_notice_save',
                form:'#frm',
                dataType:'json',
                method:'post',
                success:function(result){
                    if(result.status)
                        ST.Util.showMsg('保存成功',4);
                    else
                        ST.Util.showMsg('失败',5)
                }
            })
        })

    });
</script>
</body>
</html>
